﻿<!DOCTYPE html>
<!--安全交底和风险告知确认卡-安全交底查看签名-->
<!--[by:wanglr]-->
<!--[date:2019-06-14]-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <link href="/static/js/vue-treeselect/vue-treeselect.css" rel="stylesheet" />
    <script src="/static/js/vue-treeselect/vue-treeselect.js"></script>
    <style>
        .vue-treeselect__control {
            height: 100%;
            border: none;
            background: none;
        }

        .vue-treeselect__placeholder {
            top: -3px;
        }

        .vue-treeselect__single-value {
            top: -3px;
        }
    </style>
    <style>
        table {
            width: 100%;
            border-top: 1px solid;
            border-left: 1px solid;
            text-align: center;
            /*border-right: none;*/
        }

        table td {
            border-right: 1px solid;
            border-bottom: 1px solid;
            /*height:38px;*/
            padding: 10px;
        }

        .el-table__header {
            border: none;
        }

        .el-table__body {
            border: none;
        }

        .el-table__body td {
            border: none;
        }

        .el-table__body table {
            border: none;
        }

        .el-input__inner{
            border: none!important
        }
    </style>

</head>

<body>
    
<div id="app" v-cloak>   
        <div style="width:100%;text-align:center ">
            <label style="font-weight:bold">{{SecurityAndRiskConfirmationCard.SafetyAndRisCard}}</label>
        </div>
        <div style="width:100%;text-align:right">
            <label>Q/G11-018-R01&nbsp;&nbsp;&nbsp;No.：{{Form.id}}</label>
        </div>
        <el-form :model="Form" status-icon style="margin-top:5px;width:100%" :rules="rules" ref="ruleForm">

            <table cellpadding="0" cellspacing="0" style="">
                <tr>
                    <td width="10%">{{SecurityAndRiskConfirmationCard.OperatingUnit}}</td>
                    <td width="40%">{{Form.OperatingUnit}}</td>
                    <td width="10%">{{SecurityAndRiskConfirmationCard.WorkshopProjectLeader}}</td>
                    <td width="40%">{{Form.WorkshopProjectLeader}}</td>
                </tr>
                <tr>
                    <td>{{SecurityAndRiskConfirmationCard.JobContent}}</td>
                    <td colspan="3">{{Form.JobContent}}</td>
                </tr>
                <tr>
                    <td>{{SecurityAndRiskConfirmationCard.JobTime}}</td>
                    <td colspan="3">从 {{Form.JobTimeBegin}} 至 {{Form.JobTimeEnd}}</td>
                </tr>
                <tr>
                    <td>{{SecurityAndRiskConfirmationCard.JobPerson}}</td>
                    <td colspan="3">
                        {{getDicValue(Form.JobPerson)}}
                    </td>
                </tr>
                <tr>
                    <td colspan="4">{{SecurityAndRiskConfirmationCard.BaseRequire}}</td>
                </tr>
                <tr>
                    <td colspan="4" style="text-align:left;">{{SecurityAndRiskConfirmationCard.Instructions1}}</td>
                </tr>
            </table>
            <table cellpadding="0" cellspacing="0" style="border-top:none;">

                <tr>
                    <td width="7%">{{SecurityAndRiskConfirmationCard.ScopeAndEnvironment}}</td>
                    <td width="86%">{{Form.ScopeAndEnvironment}}</td>
                </tr>
                <tr>
                    <td width="7%">{{SecurityAndRiskConfirmationCard.SafetyAndRiskContent}}</td>
                    <td width="86%">{{Form.OperationalRisk}}</td>
                </tr>
                <tr>
                    <td width="7%" colspan="2">{{SecurityAndRiskConfirmationCard.SafetyAndRiskContent}}</td>
                </tr>
                <tr>
                    <td colspan="2">
                        <!--<el-table :data="Form.RiskIdentificationSafety" style="width: 100%;margin-bottom: 20px; border:0px solid"
                              row-style="height:10px;">
                        <el-table-column type="expand">
                            <template slot-scope="props">
                                <el-form label-position="left" inline class="demo-table-expand">
                                    <table style=" width:100%; " cellpadding="0" cellspacing="0">
                                        <thead>
                                            <tr>
                                                <td style="text-align:center">{{JSPAnalyticalManagement.Risk}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.ControlRequirements}}</td>
                                            </tr>
                                        </thead>
                                        <tbody v-for="todo in props.row.List">
                                            <tr>
                                                <td style=" text-align:center">{{todo.Risk}}</td>
                                                <td style=" text-align:center">{{todo.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{todo.ControlRequirement}}</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </el-form>
                            </template>
                        </el-table-column>
                        <el-table-column prop="RiskStepsName"
                                         :label="JSPAnalyticalManagement.WorkProcedure">
                        </el-table-column>
                    </el-table>-->
                        <!--风险识别及安全措施: 只跳检维修作业活动 作业活动等于作业步骤-->
                        <el-table :data="Form.RiskIdentificationSafety" style="width: 100%;margin-bottom: 20px;" border
                            row-style="height:10px">
                            <el-table-column type="index" :label="JobLicenseManagement.SerialNumber"
                                :index="indexMethod" width="50" show-overflow-tooltip="true"></el-table-column>
                            <el-table-column prop="RiskStepsName" :label="JSPAnalyticalManagement.WorkProcedure">
                            </el-table-column>
                            <el-table-column prop="Risk" :label="JSPAnalyticalManagement.Risk">
                            </el-table-column>
                            <el-table-column prop="HazardousFactors" :label="JSPAnalyticalManagement.HazardousFactors">
                            </el-table-column>
                            <el-table-column prop="ControlRequirement"
                                :label="JSPAnalyticalManagement.ControlRequirements">
                            </el-table-column>

                        </el-table>
                    </td>
                </tr>

                <tr>
                    <td width="7%">{{SecurityAndRiskConfirmationCard.EmergencyMeasure}}</td>
                    <td width="86%">{{Form.EmergencyMeasure}}</td>
                </tr>
                <tr>
                    <td width="7%">{{SecurityAndRiskConfirmationCard.OtherConsiderations}}</td>
                    <td width="86%">{{Form.OtherConsiderations}}</td>
                </tr>
                <tr>
                    <td width="7%">{{SecurityAndRiskConfirmationCard.SignatureOfLeader}}</td>
                    <td width="86%">
                        <signature v-model="Form.SignatureOfLeaderImg" :disabled="false"></signature>
                    </td>
                </tr>
            </table>
            <table cellpadding="0" cellspacing="0" style="border-top:none;">
                <tr>
                    <td width="10%">{{SecurityAndRiskConfirmationCard.SceneLeader}}</td>
                    <td width="90%">
                        {{SecurityAndRiskConfirmationCard.Instructions2}}<br />
                        <signature v-model="Form.SceneLeaderImg" :disabled="false"></signature>
                    </td>
                </tr>
            </table>
            <el-row>
                <el-form-item style="text-align:center; padding-top:5px">
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <el-dialog title="" :visible.sync="ListItem.dialogVisible" width="60%" height="90%" top="0vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:400px;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">

        app = new Vue({
            el: '#app',
            data: {
                id: '',
                ListItem: ListItem,
                mydata: PersonInChargeTree,
                Form: {
                    id: guidEmpty,
                    JobPerson: null,
                    SignatureOfLeader: null,
                    SceneLeader: null,
                    RiskIdentificationSafety: [],
                },
                value: 'asd',
                JobPerson: [],//作业人员
                SignatureOfLeader: [],//单位负责人签字
                SceneLeader: [],//作业单位现场负责人
                rules: {},
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                getDicValue: function (Value) {
                    return getTreeValue(this.mydata, Value);
                },
                getData: function () {
                    getData(this, '/api/SecurityAndRiskConfirmationCard/get?id=' + this.id);
                },
                UploadSign: function () {
                    alert("这是一个上传签名的按钮");
                },
                UserInput: function (val, id) { DialogShow(this, val, "AffectedPartiesAddPages.html", id); },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/SecurityAndRiskConfirmationCard/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
            },
            mounted: function () {

                this.JobPerson = fn(this.mydata, "0");
                this.SignatureOfLeader = fn(this.mydata, "0");
                this.SceneLeader = fn(this.mydata, "0");
                this.id = getUrlParam("id");
                this.getData();

            }
        });
    </script>
</body>

</html>